<!DOCTYPE html>
<html>
  <head>
    <title>提现记录</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="${s.base}/mobile/base/css/jquery-weui.css">
      <link rel="stylesheet" href="${s.base}/mobile/base/css/base.css?123456">
      <link rel="stylesheet" href="${s.base}/mobile/base/css/component.css?123456">
    <style type="text/css">
	html,body{background:#F8F8F8;}
	 .xyg-comp-lie4{width:90%; padding:20px 5% 5px 5%;}
	 .xyg-comp-lie4 .xyg-comp-item{width:25%; float:left;background:#ffffff;border-radius:5px; text-align: center;  font-size: 28px; height:80px; line-height: 80px; color: #999999;}
	.xyg-comp-lie4 .active{color: #2F2F2F;}
	 .xyg-content{width:90%; height:auto; padding:0px 5%;}
     .xyg-content .xyg-content-item{width:90%; height:auto; border-radius:15px; margin-top:10px; padding:30px 5%; background:#ffffff;}
	 .xyg-content .xyg-content-item .xyg-content-item-two{width:50%; float:left; font-size: 28px; line-height: 45px; color: #2F2F2F;}
	 .xyg-content .xyg-content-item .xyg-content-item-one{width:100%;font-size: 28px; line-height: 45px; color: #2F2F2F;}
    </style>
  </head>
  <body>
 
 
 <div class="xyg-comp-lie4">
	 <div class="xyg-comp-item active" onclick="changeType('',this)">
		 全部
	 </div>
	 <div class="xyg-comp-item " onclick="changeType('1',this)">
		 待审核
	 </div>
	 <div class="xyg-comp-item " onclick="changeType('2',this)">
		 提现成功
	 </div>
	 <div class="xyg-comp-item " onclick="changeType('3',this)">
		 提现失败
	 </div>
 	<div class="clearBoth"></div>
 </div>
   <div class="xyg-content" id="recordList">
       <!--<div class="xyg-content-item">
			<div class="xyg-content-item-two">
			姓名：张三
		   </div>
		   <div class="xyg-content-item-two">
			状态：提现成功
		   </div>
      		<div class="xyg-content-item-two">
			提现金额：￥1000
		   </div>
		   <div class="xyg-content-item-two">
			提现日期：2019.07.22
		   </div>
      		<div class="xyg-content-item-one">
			银行卡号：123467899
		   </div>
		   <div class="xyg-content-item-one">
			描述：通过银行卡打款
		   </div>
           <div class="clearBoth"></div>
       </div>-->
   </div>
  </body>
  <script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
  <script src="${s.base}/mobile/base/js/jquery-2.1.4.js"></script>
  <script src="${s.base}/mobile/base/js/jquery-weui.js"></script>
  <script src="${s.base}/mobile/base/js/swiper.js"></script>
  <script src="${s.base}/mobile/base/fonts/iconfont.js"></script>
  <script src="${s.base}/mobile/base/js/component.js"></script>
  <script src="${s.base}/mobile/base/js/base.js?123456789000"></script>

  <!--js分享代码开始-->
  <input type="hidden" value="${jSTicketShareResponse.appid}" id="appid" />
  <input type="hidden" value="${jSTicketShareResponse.fxTitle}" id="fxTitle" />
  <input type="hidden" value="${jSTicketShareResponse.fxImgUrl}" id="fxImgUrl" />
  <input type="hidden" value="${jSTicketShareResponse.fxDesc}" id="fxDesc" />
  <input type="hidden" value="${jSTicketShareResponse.fxUrl}" id="fxUrl" />
  <input type="hidden" value="${jSTicketShareResponse.nonceStr}" id="nonceStr" />
  <input type="hidden" value="${jSTicketShareResponse.timestamp}" id="timestamp" />
  <input type="hidden" value="${jSTicketShareResponse.signature}" id="signature" />
  <script src="${s.base}/mobile/base/js/share.js"></script>
  <script type="text/javascript">
  	initXygDpi();
    var memberId='${memberId}';
    var currentType="";
    $(document).ready(function(e) {
        initDate();
    });

    function initDate() {
        //初始化商品
        initProduct();
    }


    function changeType(type,obj) {
        currentType=type;
        pageNum = 0;
        $(".xyg-tab .xyg-tab-item").removeClass("tab-active");
        $(obj).addClass("tab-active");
        $("#recordList").html("");
        if(isDestroy){
            initProduct();
        }else{
            sendPost();
        }
    }


    var memberId='${memberId}';
    var pageNum = 0;
    var pageSize = 5;
    var loading = false;  //状态标记
    var isDestroy = false;  //状态标记
    /**
     * 初始化内容页面信息
     * @param cityId
     */
    function initProduct() {
        isDestroy = false;
        $(document.body).infinite().on("infinite", function () {
            if (loading) return;
            loading = true;
            sendPost();
        });
        sendPost();
    }

    function sendPost() {
        pageNum++;
        $.fn.postMethodAll("/weChat/hostWithdraw/page",{'pageNum':pageNum,'pageSize':pageSize,'withdrowStatus':currentType,'memberId':memberId},function (result) {
            if (result.data != null && result.data.length > 0) {
                result.data.forEach(function (item,key,mapObj) {
                    //提现状态:1、待审核，2、提现成功,3、提现失败
                    var result="";
                    var recordTypeStr="待审核";
                    if(item.withdrowStatus=="2"){
                        recordTypeStr="提现成功";
                        result='<div class="xyg-content-item-one">描述：'+item.result+'</div>';
                    }else if(item.withdrowStatus=="3"){
                        recordTypeStr="提现失败";
                        result='<div class="xyg-content-item-one">描述：'+item.result+'(提现金额自动添加到账户余额)</div>';
                    }

                    var str='<div class="xyg-content-item">'+
                        '<div class="xyg-content-item-two">姓名：'+item.name+'</div>'+
                        '<div class="xyg-content-item-two">状态：'+recordTypeStr+'</div>'+
                        '<div class="xyg-content-item-two">提现金额：'+item.money+'</div>'+
                        '<div class="xyg-content-item-two">提现日期：'+item.createTimeStr+'</div>'+
                        '<div class="xyg-content-item-one">银行卡号：'+item.bankNo+'</div>'+result+
                        '<div class="clearBoth"></div>'+
                        '</div>';
                    $("#recordList").append(str);
                });
                loading = false;
                if (!result.hasNextPage) {
                    $(document.body).destroyInfinite();
                    isDestroy=true;
                }
            } else {
                $(document.body).destroyInfinite();
                isDestroy=true;
            }
            if(result.count<=0){
                $("#recordList").html('<div style="width: 100%; height: auto; line-height: 50px; text-align: center; margin-top: 150px; color: #0A0A0A; font-size: 32px;">'+
                    '<img src="${s.base}/mobile/base/images/no.png" style="width: 350px; height: auto; margin: 10px auto;"/>'+
                    '暂无数据</div>');
            }
        });
    }
  </script>
  
</html>

